<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en" slick-uniqueid="1">
<head>
	<jdoc:include type="head" />
	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
	<title></title>
	<link rel="stylesheet" type="text/css" href="<?php echo $this->baseurl ?>/templates/savvis/css/style.css">
	<link rel="stylesheet" type="text/css" href="<?php echo $this->baseurl ?>/templates/savvis/css/humanity/jquery-ui-1.8.20.custom.css" media="screen" />
	<link rel="stylesheet" type="text/css" href="<?php echo $this->baseurl ?>/templates/savvis/css/jquery-ui-1.8.16.custom_.css" />
	<link rel="stylesheet" type="text/css" href="<?php echo $this->baseurl ?>/templates/savvis/css/savvis.css">	
	<script type="text/javascript" src="<?php echo $this->baseurl ?>/templates/savvis/scripts/jquery-1.7.1.min.js"></script>
	<script type="text/javascript" src="<?php echo $this->baseurl ?>/templates/savvis/scripts/jquery.easing.1.3.js"></script>
	<script type="text/javascript" src="<?php echo $this->baseurl ?>/templates/savvis/scripts/jquery.slideimgs.home.js"></script>
	<script type="text/javascript" src="<?php echo $this->baseurl ?>/templates/savvis/scripts/jquery-ui-1.8.16.custom.min.js"></script>
	<script type="text/javascript" src="<?php echo $this->baseurl ?>/templates/savvis/scripts/slider.hover.box.js"></script>
	<script type="text/javascript">
		$(document).ready(function(){
			
		});
	</script>
		<script type="text/javascript">
			$(function(){

				//Mailing List Dialog
				$( "#mailling-list-dialog" ).dialog({ 
					autoOpen: false,
					show: "blind",
					hide: "explode",
					modal: true
				});		
				$( "#download-dialog" ).dialog({ 
					autoOpen: false,
					show: "blind",
					hide: "explode",
					modal: true
				});	
				$( ".download" ).click(function() { 
					var $file = "http://savvisasia.com/"+$(this).attr("href");
					$( "#download-dialog" ).dialog( "open" );
					$('<input type="hidden" name="file" id="file" value="'+$file+'" />').appendTo('#downloadform');
					return false;
				});
				$( ".enquired" ).click(function() { 
					$( "#mailling-list-dialog" ).dialog( "open" );
					return false;
				});
			});
		</script>
	<script>
	jQuery(document).ready(function($) {
		var formxx = "#enquiryform";
	
		$(formxx).submit(function() {
			var emailReg = /^([\w-\.]+@([\w-]+\.)+[\w-]{2,4})?$/;
			url = $(this).attr( 'action' );
			
			$(formxx+' #component23').css("display", "none");
			$(formxx+' #component24').css("display", "none");
			$(formxx+' #component25').css("display", "none");
			$(formxx+' #component26').css("display", "none");
			$(formxx+' #component28').css("display", "none");
			
			//Kiem tra noi dung input
			if($(formxx+' #emailaddress').val()=="" || !emailReg.test($(formxx+' #emailaddress').val()) || $(formxx+' #firstname').val()=="" || $(formxx+' #contactnumber').val()==""  || $(formxx+' #companyname').val()=="" || $(formxx+' #message').val()=="")
			{
				if($(formxx+' #contactnumber').val()=="")		
				{
					//alert($(formxx+' #component36').html()); 
					$(formxx+' #component28').css("display", "block");
				}
				if($(formxx+' #companyname').val()=="")		
				{
					//alert($(formxx+' #component36').html()); 
					$(formxx+' #component25').css("display", "block");
				}
				if($(formxx+' #firstname').val()=="")		
				{
					//alert($(formxx+' #component31').html()); 
					$(formxx+' #component23').css("display", "block");
				}
				if($(formxx+' #emailaddress').val()=="")		
				{
					//alert($(formxx+' #component32').html()); 
					$(formxx+' #component24').css("display", "block");
				}
				if($(formxx+' #message').val()=="")		
				{
					//alert($(formxx+' #component34').html()); 
					$(formxx+' #component26').css("display", "block");
				}
			}
			else
			{				
				
				// Cho hien dialog thong bao cho
				$('#dialog-message p').html('<div style="padding: 0  20px; text-align: center;"><img style="margin: 0 auto" src="<?php echo $this->baseurl ?>/templates/savvis/images/ajax-loading.gif" /><br /> Message is sending...!</div>');
				$( "#dialog:ui-dialog" ).dialog( "destroy" );	
				$( "#dialog-message" ).dialog({
					modal: true,
					buttons: {
						Ok: function() {
							$( this ).dialog( "close" );
						}
					}
				});		
				
				// Gui noi dung de xu ly
				$.ajax({
					  type: 'POST',
					  url: url,
					  data: $(this).serialize(),
					  success: function(data) {					  
							
								// Cho hien dialog thanh cong
								$('#dialog-message p').html('<div style="padding: 0  20px; text-align: center;"><p>Your requests has been sent. We will contact you shortly. Thank you !</p></div>');
								$( "#dialog:ui-dialog" ).dialog( "destroy" );
							
								$( "#dialog-message" ).dialog({
									modal: true,
									buttons: {
										Ok: function() {
											//window.location = $('#file').val();
											//alert($("#file").val());
											$( this ).dialog( "close" );
										}
									}
								});
								
								//Reset all input in form
								$(formxx).each(function(){this.reset();});
							
							}
						  
					});				
			}
			return false;
	});

});
	</script>
	<script>
	jQuery(document).ready(function($) {
		var formx = "#downloadform";
	
		$(formx).submit(function() {
			var emailReg = /^([\w-\.]+@([\w-]+\.)+[\w-]{2,4})?$/;
			url = $(this).attr( 'action' );
			
			$(formx+' #component29').css("display", "none");
			$(formx+' #component30').css("display", "none");
			$(formx+' #component31').css("display", "none");
			$(formx+' #component34').css("display", "none");

			
			//Kiem tra noi dung input
			if($(formx+' #Email').val()=="" || !emailReg.test($(formx+' #Email').val()) || $(formx+' #Name').val()=="" || $(formx+' #Company').val()==""  || $(formx+' #Work').val()=="" )
			{
				if($(formx+' #Email').val()=="")		
				{
					//alert($(formxx+' #component36').html()); 
					$(formx+' #component30').css("display", "block");
				}
				if($(formx+' #Name').val()=="")		
				{
					//alert($(formxx+' #component36').html()); 
					$(formx+' #component29').css("display", "block");
				}
				if($(formx+' #Company').val()=="")		
				{
					//alert($(formxx+' #component31').html()); 
					$(formx+' #component31').css("display", "block");
				}
				if($(formx+' #Work').val()=="")		
				{
					//alert($(formxx+' #component32').html()); 
					$(formx+' #component34').css("display", "block");
				}
			}
			else
			{				
				
				// Cho hien dialog thong bao cho
				$('#dialog-message p').html('<div style="padding: 0  20px; text-align: center;"><img style="margin: 0 auto" src="<?php echo $this->baseurl ?>/templates/savvis/images/ajax-loading.gif" /><br /> Message is sending...!</div>');
				$( "#dialog:ui-dialog" ).dialog( "destroy" );	
				$( "#dialog-message" ).dialog({
					modal: true,
					buttons: {
						Ok: function() {
							$( this ).dialog( "close" );
						}
					}
				});		
				
				// Gui noi dung de xu ly
				$.ajax({
					  type: 'POST',
					  url: url,
					  data: $(this).serialize(),
					  success: function(data) {					  
							
								// Cho hien dialog thanh cong
								$('#dialog-message p').html('<div style="padding: 0  20px; text-align: center;"><p>Your requests has been sent. We will contact you shortly. Thank you !</p></div>');
								$( "#dialog:ui-dialog" ).dialog( "destroy" );
							
								$( "#dialog-message" ).dialog({
									modal: true,
									buttons: {
										Ok: function() {
											window.location = $('#file').val();
											$( this ).dialog( "close" );
										}
									}
								});
								
								//Reset all input in form
								$(formx).each(function(){this.reset();});
							
							}
						  
					});				
			}
			return false;
	});

});
	</script>
	<style>
		#container{background-image:none}
	</style>
<?php if(JRequest::getVar('Itemid')=='101') {?>
<style>
body{background:#DADADA;}
#wrapper{background:#DADADA;}
</style>
<?php } ?>
</head>
<body>
<div id="dialog-message" ><p></p></div>	
<div id="mailling-list-dialog" >
	<jdoc:include type="modules" name="dialogue" />
</div>
<div id="download-dialog" >
	<jdoc:include type="modules" name="download" />
</div>
<div id="content" class="mha">
	<div id="wrapper" class="por">
		<div class="bd1B ">
			<div id="header" class="ofh <?php if(JRequest::getVar('Itemid')!='101') { echo 'pb10'; } ?>">
				<!--logo-->
				<div id="logo" class="rounded10 shadow">
					<jdoc:include type="modules" name="logo" />
				</div><!--logo-->
				<div class="clear"></div>	
					<jdoc:include type="modules" name="banner" />

			</div><!--header-->
		</div><!--bd1B-->
		<jdoc:include type="modules" name="breadcrumbs" />
		<div id="container" <?php if(JRequest::getVar('Itemid')=='101') {	echo  'class="bg3"'; } ?>>
			<jdoc:include type="modules" name="middle" />
			<div class="w960 mha <?php if(JRequest::getVar('Itemid')!='101') {	 echo 'bg2'; } ?> ofh">

				<jdoc:include type="component" />
			</div>
		</div><!--container-->	
		
		<div class="clear"></div>
		
	<!--end wrapper-->
	</div>
	<div id="footer" class="shadow">
	
		<div class="ftcontent ofh">
			<jdoc:include type="modules" name="footer" />

		</div>
	</div>

</div>
</body>
</html>